package org.jeecg.modules.operations.assistant.crm.service;

import org.jeecg.modules.operations.assistant.crm.entity.*;
import com.baomidou.mybatisplus.extension.service.IService;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;

/**
 * @Description: 工单信息
 * @Author: jeecg-boot
 * @Date:   2024-01-07
 * @Version: V1.0
 */
public interface ICrmWorkOrderService extends IService<CrmWorkOrder> {

	/**
	 * 添加一对多
	 *
	 * @param workOrder
	 * @param installationOrderList
	 * @param maintainOrdersList
	 * @param workOrderProcessList
	 */
	public void saveMain(CrmWorkOrder workOrder, List<CrmInstallationOrder> installationOrderList, List<CrmMaintainOrders> maintainOrdersList, List<CrmWorkOrderProcess> workOrderProcessList) ;
	
	/**
	 * 修改一对多
	 *
	 * @param workOrder
	 * @param installationOrderList
	 * @param maintainOrdersList
	 * @param workOrderProcessList
	 * @param attendanceRecordList
	 */
	public void updateMain(CrmWorkOrder workOrder,List<CrmInstallationOrder> installationOrderList,List<CrmMaintainOrders> maintainOrdersList,List<CrmWorkOrderProcess> workOrderProcessList,List<CrmAttendanceRecord> attendanceRecordList);
	
	/**
	 * 删除一对多
	 *
	 * @param id
	 */
	public void delMain (String id);
	
	/**
	 * 批量删除一对多
	 *
	 * @param idList
	 */
	public void delBatchMain (Collection<? extends Serializable> idList);

	/**
	 * 修改一对多
	 *
	 * @param workOrder
	 * @param workOrderProcessList
	 */
	public void updateMain(CrmWorkOrder workOrder,List<CrmWorkOrderProcess> workOrderProcessList);

	/**
	 * 修改一对多
	 *
	 * @param workOrder
	 * @param workServiceRecordsList
	 */
	public void updateServiceRecords(CrmWorkOrder workOrder,List<CrmWorkServiceRecords> workServiceRecordsList,List<CrmWorkOrderProcess> workOrderProcessList);

	/**
	 * 修改一对多
	 *
	 * @param workOrder
	 * @param workOrderProcessList
	 * @param attendanceRecordList
	 */
	public void updateMain(CrmWorkOrder workOrder,List<CrmWorkOrderProcess> workOrderProcessList,List<CrmAttendanceRecord> attendanceRecordList);

	/**
	 * 修改一对多
	 *
	 * @param workOrder
	 * @param followUpList
	 */
	public void updateFollowUp(CrmWorkOrder workOrder,List<CrmFollowUp> followUpList,List<CrmWorkOrderProcess> workOrderProcessList);

	/**
	 * 修改一对多
	 *
	 * @param workOrder
	 * @param workOrderReceiptList
	 */
	public void updateWorkOrderReceipt(CrmWorkOrder workOrder,List<CrmWorkOrderReceipt> workOrderReceiptList,List<CrmWorkOrderProcess> workOrderProcessList);

	/**
	 * 修改一对多
	 *
	 * @param workOrder
	 * @param workOrderReceiptList
	 */
	public void receiptReview(CrmWorkOrder workOrder,List<CrmWorkOrderReceipt> workOrderReceiptList,List<CrmWorkOrderProcess> workOrderProcessList);

	public CrmWorkOrderStatistics statistics();

	public CrmWorkOrderStatistics statistics(String userName);
}
